
class MyRunnable implements Runnable{

    @Override
    public void run() {
        System.out.println("hello thread...");
    }
}

public class ThreadDemo01 {
    public static void main(String[] args) {
        // 描述任务
        MyRunnable myRunnable = new MyRunnable();
        // 将这个任务交给线程来执行
        Thread thread = new Thread(myRunnable);
        thread.start();
    }
}
